/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sim.helpers.comparers;

import sim.coalitional.Coordinates;

/**
 *
 * @author artem
 */
public class CoordinatesComparer implements java.util.Comparator<Coordinates> {

    public int compare(Coordinates c1, Coordinates c2) {
        if (c1.getX() > c2.getX()) {
            return 1;
        } else if (c1.getX() == c2.getX()) {
            if (c1.getY() > c2.getY()) {
                return 1;
            }
			return -1;
        } else {
            return -1;
        }
    }
}
